//
//  UFilesystem.h
//  UltraStarDeluxeIOS
//
//  Created by 李 杰军 on 12-7-15.
//  Copyright (c) 2012年 DoReiMi. All rights reserved.
//

#ifndef UltraStarDeluxeIOS_UFilesystem_h
#define UltraStarDeluxeIOS_UFilesystem_h

#include <vector.h>

struct FileInfo
{
    std::string filename;
    std::string path;
    std::string basename;
    size_t size;
};

typedef std::vector<FileInfo> FileInfoList;

class TFilesystem
{
protected:
    void findFiles(const std::string& path, const std::string& pattern, bool recursive, bool dirs, std::vector<std::string>* simpleList, FileInfoList* detailList) const;
    
public:
    std::vector<std::string>* list(const std::string& path, const std::string& pattern, bool recursive = true, bool dirs = false);
};

extern TFilesystem* FileSystem;

#endif
